package com.sunseaypw.springmvc.web;

import java.util.List;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor;

@Component
public class ChatHandshakeInterceptor extends HttpSessionHandshakeInterceptor {
    public ChatHandshakeInterceptor() {
        // 指定从HttpSession复制属性到WebSocketSession 
        //不全部copy 而只是定向copy
        super(List.of(UserController.KEY_USER));
    }

    // @Scheduled(initialDelay = 2_000, fixedRate = 3_000)
	// void scheduleA(){
	// 	System.out.println("schecduleAAAA THREAD NAME:"+Thread.currentThread().getName());
	// }
}